﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="detail_post.aspx.cs" Inherits="Activity_Live_detail_post" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <Custom:Header runat="server" />
    <style  type="text/css">.loading2{padding-left:18px;line-height:22px; background-position:left center;display:none;}</style>
    <script type="text/javascript" src="/KindEditor/kindeditor-min.js"></script>
<script type="text/javascript" src="/KindEditor/lang/zh_CN.js"></script>
    <script type="text/javascript">
        $(function () {
            KindEditor.ready(function (K) {
                KE = K.create('#content', {
                    resizeType: 1,
                    allowPreviewEmoticons: false,
                    allowImageUpload: false,
                    items: [
				'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
				 'strikethrough', 'table', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
				'insertunorderedlist', '|', 'image', 'link', 'source']
                });

            });

            $("#save").click(function () { 
                
                $.ajax({
                    url: "/ajaxdata/activity/",
                    type: "POST",
                    data: {action:"live_detail_save",did:$("input[name=did]").val(),lid:$("input[name=lid]").val(),content:KE.html()},
                    dataType: "json",
                    success: function(data) {
                        if (data.succ) {
                            location="detail_list.aspx?lid=<%=Request["lid"] %>";
                        }
                        else {
                            alert(data.msg);
                        }
                    },
                    beforeSend:function(){
                        $("#save").hide().next().show();
                    },
                    error: function(data, status, e) {
                        alert("提交发生意外。")
                    },
                    complete: function() {
                        $("#save").show().next().hide();
                    }
            });
            });
        });
    </script>
</head>
<body>
    <div><input type="hidden" name="did" value="<%=Request["id"] %>" /><input type="hidden" name="lid" value="<%=Request["lid"] %>" /></div>
     <table class="tab" cellspacing=0>
        <tr><td style="line-height:26px;background-color:#E7F2D9">添加直播内容：[<span style="color#666;font-weight:bold"><%=new Com.Ooohd.Bll.Activity.ZS_Live().GetSingle(int.Parse(Request["lid"])).Title %></span>]</td></tr>
        <tr><td><textarea style="width:100%;height:400px; display: none;" id="content" name="content"><%=content %></textarea></td></tr>
     </table>
    <div class="divsub"><span></span><input type="button" class="btn" id="save" value="保存" ><span class='loading2'>数据提交中…</span> <input type="button" value="返回列表" onclick="location='detail_list.aspx?lid=<%=Request["lid"] %>';" class="btn"></div>
</body>
</html>
